// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Elastic.Clients.Elasticsearch.SearchableSnapshots;

public partial class SearchableSnapshotsNamespacedClient : NamespacedClientProxy
{
	/// <summary>
	/// <para>
	/// Initializes a new instance of the <see cref="SearchableSnapshotsNamespacedClient"/> class for mocking.
	/// </para>
	/// </summary>
	protected SearchableSnapshotsNamespacedClient() : base()
	{
	}

	internal SearchableSnapshotsNamespacedClient(ElasticsearchClient client) : base(client)
	{
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual CacheStatsResponse CacheStats(CacheStatsRequest request)
	{
		request.BeforeRequest();
		return DoRequest<CacheStatsRequest, CacheStatsResponse, CacheStatsRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CacheStatsResponse> CacheStatsAsync(CacheStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<CacheStatsRequest, CacheStatsResponse, CacheStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual CacheStatsResponse CacheStats(CacheStatsRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual CacheStatsResponse CacheStats(Elastic.Clients.Elasticsearch.NodeIds? nodeId)
	{
		var descriptor = new CacheStatsRequestDescriptor(nodeId);
		descriptor.BeforeRequest();
		return DoRequest<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual CacheStatsResponse CacheStats(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Action<CacheStatsRequestDescriptor> configureRequest)
	{
		var descriptor = new CacheStatsRequestDescriptor(nodeId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual CacheStatsResponse CacheStats()
	{
		var descriptor = new CacheStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual CacheStatsResponse CacheStats(Action<CacheStatsRequestDescriptor> configureRequest)
	{
		var descriptor = new CacheStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CacheStatsResponse> CacheStatsAsync(CacheStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CacheStatsResponse> CacheStatsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, CancellationToken cancellationToken = default)
	{
		var descriptor = new CacheStatsRequestDescriptor(nodeId);
		descriptor.BeforeRequest();
		return DoRequestAsync<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CacheStatsResponse> CacheStatsAsync(Elastic.Clients.Elasticsearch.NodeIds? nodeId, Action<CacheStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new CacheStatsRequestDescriptor(nodeId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CacheStatsResponse> CacheStatsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new CacheStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve node-level cache statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<CacheStatsResponse> CacheStatsAsync(Action<CacheStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new CacheStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<CacheStatsRequestDescriptor, CacheStatsResponse, CacheStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache(ClearCacheRequest request)
	{
		request.BeforeRequest();
		return DoRequest<ClearCacheRequest, ClearCacheResponse, ClearCacheRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync(ClearCacheRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ClearCacheRequest, ClearCacheResponse, ClearCacheRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache<TDocument>(ClearCacheRequestDescriptor<TDocument> descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache<TDocument>(Elastic.Clients.Elasticsearch.Indices? indices)
	{
		var descriptor = new ClearCacheRequestDescriptor<TDocument>(indices);
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache<TDocument>(Elastic.Clients.Elasticsearch.Indices? indices, Action<ClearCacheRequestDescriptor<TDocument>> configureRequest)
	{
		var descriptor = new ClearCacheRequestDescriptor<TDocument>(indices);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache<TDocument>()
	{
		var descriptor = new ClearCacheRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache<TDocument>(Action<ClearCacheRequestDescriptor<TDocument>> configureRequest)
	{
		var descriptor = new ClearCacheRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache(ClearCacheRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indices? indices)
	{
		var descriptor = new ClearCacheRequestDescriptor(indices);
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache(Elastic.Clients.Elasticsearch.Indices? indices, Action<ClearCacheRequestDescriptor> configureRequest)
	{
		var descriptor = new ClearCacheRequestDescriptor(indices);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache()
	{
		var descriptor = new ClearCacheRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual ClearCacheResponse ClearCache(Action<ClearCacheRequestDescriptor> configureRequest)
	{
		var descriptor = new ClearCacheRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync<TDocument>(ClearCacheRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync<TDocument>(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearCacheRequestDescriptor<TDocument>(indices);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync<TDocument>(Elastic.Clients.Elasticsearch.Indices? indices, Action<ClearCacheRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearCacheRequestDescriptor<TDocument>(indices);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearCacheRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync<TDocument>(Action<ClearCacheRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearCacheRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor<TDocument>, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync(ClearCacheRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearCacheRequestDescriptor(indices);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action<ClearCacheRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearCacheRequestDescriptor(indices);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearCacheRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Clear the cache of searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ClearCacheResponse> ClearCacheAsync(Action<ClearCacheRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ClearCacheRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ClearCacheRequestDescriptor, ClearCacheResponse, ClearCacheRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Mount a snapshot as a searchable index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual MountResponse Mount(MountRequest request)
	{
		request.BeforeRequest();
		return DoRequest<MountRequest, MountResponse, MountRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Mount a snapshot as a searchable index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<MountResponse> MountAsync(MountRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<MountRequest, MountResponse, MountRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Mount a snapshot as a searchable index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual MountResponse Mount(MountRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<MountRequestDescriptor, MountResponse, MountRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Mount a snapshot as a searchable index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual MountResponse Mount(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot)
	{
		var descriptor = new MountRequestDescriptor(repository, snapshot);
		descriptor.BeforeRequest();
		return DoRequest<MountRequestDescriptor, MountResponse, MountRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Mount a snapshot as a searchable index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual MountResponse Mount(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action<MountRequestDescriptor> configureRequest)
	{
		var descriptor = new MountRequestDescriptor(repository, snapshot);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<MountRequestDescriptor, MountResponse, MountRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Mount a snapshot as a searchable index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<MountResponse> MountAsync(MountRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<MountRequestDescriptor, MountResponse, MountRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Mount a snapshot as a searchable index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<MountResponse> MountAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, CancellationToken cancellationToken = default)
	{
		var descriptor = new MountRequestDescriptor(repository, snapshot);
		descriptor.BeforeRequest();
		return DoRequestAsync<MountRequestDescriptor, MountResponse, MountRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Mount a snapshot as a searchable index.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-api-mount-snapshot.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<MountResponse> MountAsync(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Name snapshot, Action<MountRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new MountRequestDescriptor(repository, snapshot);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<MountRequestDescriptor, MountResponse, MountRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats(SearchableSnapshotsStatsRequest request)
	{
		request.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequest, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(request);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync(SearchableSnapshotsStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequest, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats<TDocument>(SearchableSnapshotsStatsRequestDescriptor<TDocument> descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats<TDocument>(Elastic.Clients.Elasticsearch.Indices? indices)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor<TDocument>(indices);
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats<TDocument>(Elastic.Clients.Elasticsearch.Indices? indices, Action<SearchableSnapshotsStatsRequestDescriptor<TDocument>> configureRequest)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor<TDocument>(indices);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats<TDocument>()
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats<TDocument>(Action<SearchableSnapshotsStatsRequestDescriptor<TDocument>> configureRequest)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats(SearchableSnapshotsStatsRequestDescriptor descriptor)
	{
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor(indices);
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats(Elastic.Clients.Elasticsearch.Indices? indices, Action<SearchableSnapshotsStatsRequestDescriptor> configureRequest)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor(indices);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats()
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	[Obsolete("Synchronous methods are deprecated and could be removed in the future.")]
	public virtual SearchableSnapshotsStatsResponse Stats(Action<SearchableSnapshotsStatsRequestDescriptor> configureRequest)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequest<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync<TDocument>(SearchableSnapshotsStatsRequestDescriptor<TDocument> descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync<TDocument>(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor<TDocument>(indices);
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync<TDocument>(Elastic.Clients.Elasticsearch.Indices? indices, Action<SearchableSnapshotsStatsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor<TDocument>(indices);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync<TDocument>(CancellationToken cancellationToken = default)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor<TDocument>();
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync<TDocument>(Action<SearchableSnapshotsStatsRequestDescriptor<TDocument>> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor<TDocument>();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor<TDocument>, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync(SearchableSnapshotsStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, CancellationToken cancellationToken = default)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor(indices);
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync(Elastic.Clients.Elasticsearch.Indices? indices, Action<SearchableSnapshotsStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor(indices);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>
	/// Retrieve shard-level statistics about searchable snapshots.
	/// </para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/searchable-snapshots-apis.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<SearchableSnapshotsStatsResponse> StatsAsync(Action<SearchableSnapshotsStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new SearchableSnapshotsStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<SearchableSnapshotsStatsRequestDescriptor, SearchableSnapshotsStatsResponse, SearchableSnapshotsStatsRequestParameters>(descriptor, cancellationToken);
	}
}